package com.community.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * (LampLog)表实体类
 *
 * @author makejava
 * @since 2021-12-06 10:34:41
 */
@SuppressWarnings("serial")
public class LampLog extends Model<LampLog> {

    @TableId(value = "id", type = IdType.INPUT) //这种方式是主键手动输入
    private Integer id;
    //灯控名称
    private String lampName;
    //工作状态
    private Integer lampState;
    //工作时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date lampDate;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLampName() {
        return lampName;
    }

    public void setLampName(String lampName) {
        this.lampName = lampName;
    }

    public Integer getLampState() {
        return lampState;
    }

    public void setLampState(Integer lampState) {
        this.lampState = lampState;
    }

    public Date getLampDate() {
        return lampDate;
    }

    public void setLampDate(Date lampDate) {
        this.lampDate = lampDate;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

